<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Amaze UI Admin index Examples</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <script src="http://cdn.bootcss.com/echarts/3.3.2/echarts.min.js"></script>
    <link rel="stylesheet" href="assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="assets/css/amazeui.datatables.min.css"/>
    <link rel="stylesheet" href="assets/css/app.css">
    <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>

</head>

<body>
<script src="assets/js/theme.js"></script>
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <!---->
            <!--form 表单-->

        </div>
    </div>
</div>


<!--表格显示内容-->
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-fl">权限列表 ></div>
                    <div class="widget-body  am-fr">
                        <!--条件少选-->
                        <div class="am-u-sm-12">
                            <div class="am-form-group">
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <form action="">

                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--按钮操作-->
                        <div class="am-u-sm-12">
                            <div class="am-form-group">
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <button type="button" class="am-btn am-btn-default am-btn-success"
                                                th:each="item :${pre}">
                                            <span class="am-icon-plus" th:text="${item.menuName}">menuName</span>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="widget-body  widget-body-lg am-fr">
                        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black "
                               id="example-r">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>菜单名称</th>
                                <th>菜单描述</th>
                                <th>菜单icon</th>
                                <th>菜单权重</th>
                                <th>创建时间</th>
                                <th>更新时间</th>
                            </tr>
                            </thead>
                            <tbody id="tbody_tr">

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/html" id="table_tbody">
        {{each beans}}
        <tr class="gradeX">
            <td>{{$value.id}}</td>
            <td>{{$value.menuName}}</td>
            <td>{{$value.menuDesc}}</td>
            <td>{{$value.menuIcon}}</td>
            <td>{{$value.menuSort}}</td>
            <td>{{$value.addTime}}</td>
            <td>{{$value.updateTime}}</td>
        </tr>
        {{/each}}
    </script>
    <script src="http://cdn.bootcss.com/amazeui/2.7.2/js/amazeui.min.js"></script>
    <script src="assets/js/amazeui.datatables.min.js"></script>
    <script src="assets/js/dataTables.responsive.min.js"></script>
    <script src="assets/js/app.js"></script>
    <script src="assets/js/template-web.js"></script>
    <script type="module">

        import resource from '/assets/js/api/menuResource.js';

        // 数据展示
        resource.menuList().then(res => {
            console.log(res)
            $("#tbody_tr").html(template("table_tbody", res.data));
        });
    </script>
</body>
</html>